package com.yimi.flutter.plugin.flutter_plugin_baidu.methodcall;

import android.content.Intent;
import android.os.Bundle;

import com.yimi.flutter.plugin.flutter_plugin_baidu.app.YmApp;
import com.yimi.flutter.plugin.flutter_plugin_baidu.constant.PluginKey;
import com.yimi.flutter.plugin.flutter_plugin_baidu.service.SpeechIntentService;

/**
 * 语音播报
 */
public final class SpeakUtil {
    public static void speak(String text) {
        Intent workIntent = new Intent();
        Bundle bundle = new Bundle();
        bundle.putString(PluginKey.SPEECHKEY, text);
        workIntent.putExtras(bundle);
        SpeechIntentService.enqueueWork(YmApp.context, workIntent);
    }

}
